<?php
/**
 * DynaGrid - The PHP datagrid
 *
 * @package    DynaGrid
 * @author     $Author: keesschepers $
 * @version    $Id: Header.php 13 2011-02-14 07:23:17Z keesschepers $
 */

/**
 * Header part of the table <thead>
 *
 */
class DynaGrid_HTML_Table_Header extends DynaGrid_HTML_Abstract {
	protected $tagname = 'thead';
	/**	 
	 * @var DynaGrid_Table_Columns
	 */
	protected $columns;
	public function __construct(DynaGrid_HTML_Table_Columns &$columns) {		
		$this->columns = $columns;
	}	
	public function getHTML() {
		$this->innerHTML = '<tr>';
		foreach ($this->columns->getColumns('header') as $column) {
			$this->innerHTML .= $column->getHTML();
		}
		$this->innerHTML .= '</tr>';
		return parent::getHTML();
	}
}